<template>
  <div>
    <van-cell-group class="wzxq">
      <van-cell>
        <!-- 使用 right-icon 插槽来自定义右侧图标 -->
        <template #title>
          <div class="ImgBox">
            <img :src="`http://liufusong.top:8080${item.houseImg}`" alt="" />
          </div>
          <div class="TextBox">
            <p class="title">{{ item.title }}</p>
            <p class="desc">{{ item.desc }}</p>
            <!-- <span class="tag" v-for="(item, index) in item.tags" :key="index">{{
              item
            }}</span> -->
            <span class="tag colorBlue">{{ item.tags[0] }}</span>
            <span class="tag colorGreen" v-show="item.tags[1]">{{ item.tags[1] }}</span>
            <span class="tag colorShyBlue" v-show="item.tags[2]">{{ item.tags[2] }}</span>
             <span class="tag " v-show="item.tags[3]">{{ item.tags[3] }}</span>

            <p class="price">{{ item.price }} <span>元/月</span></p>
          </div>
        </template>
      </van-cell>
    </van-cell-group>
  </div>
</template>

<script>
export default {
  props: ['item'],
  color: 1
}
</script>

<style lang="less" scoped>
/deep/.van-cell {
  width: 100%;
  height: 120px;
  // background-color: aqua;
  padding: 18px 0 0;
  display: flex;
  box-sizing: border-box;
}
.ImgBox {
  display: inline-block;
  width: 106px;
  height: 80px;
  // background-color: brown;
  float: left;
  display: inline-block;
  img {
    width: 100%;
    height: 100%;
  }
}
.TextBox {
  width: 269px;
  height: 89px;
  float: left;
  .title {
    box-sizing: border-box;
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    padding-left: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .desc {
    margin: 0;
    font-size: 12px;
    padding-left: 12px;
    color: #b5b7b8;
  }
  .tag {
    margin: 0;
    padding: 4px 5px;
    // width: 20px;
    height: 16px;
  // box-sizing: border-box;
    margin-left: 12px;
    text-align: center;
    border-radius: 5px;
  }
  .colorBlue {
    color: #39becd;
    background-color: #e5f4f7;
  }
  .colorGreen {
    color: #3fc28c;
    background-color: #e1f5ed;
  }
  .colorShyBlue {
        color: #5aabfd;
    background: #e6f2ff;
  }
  .price {
    margin: 0;
    padding-left: 16px;
    color: red;
    font-weight: 700;
    span {
      font-size: 12px;
      font-weight: normal;
      // transform: scale(0.5) !important;
    }
  }
}
</style>
